package com.junqson.je.content.repo;

import com.junqson.je.content.model.ProblemModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

/**
 * @Descriptions
 * @Company
 * @Author Junqson
 * @Date 2020/2/11 23:14
 * @Version 1.0
 */
@Repository
public interface ProblemRepo extends JpaRepository<ProblemModel, Long> {
    List<ProblemModel> findByPsIdOrderByTypeAsc(Long psId);

    @Transactional
    void deleteByPsId(Long psId);
}
